7px
05/28/2024, 8:09 AMdiv
with the id "addme", then having a button that runs a function that adds a new element by running document.createElement()
, then .setAttribute()
, then finally .appendChild()
on each element before it gets added to the div.
As in the image, there are two text fields whose values I need to extract value from. Debugging from the Execution log though, I can only seem to get the value from the first textbox, with the other one not even registering. Everything has been able to push onto Netsuite (and the custom record is able to generate just fine), but the values from the last textbox just won't appear.
Any and all ideas appreciated, thanks.Stefan Reeder
05/28/2024, 12:30 PMid
with some sort of counter for each added element name
ie. <input type="text" id="lotnumber1" name="lotnumber1" class="form-control" required/>
7px
05/29/2024, 2:31 AMname
attribute with a similar value to the id
attribute, yet it still won't push. for context, this is what the generated row looks like:
<input id="lot0" type="text" name="lot0" style="height: 70px; width: 360…px; text-align: center;" placeholder="Lot Number..." required="">
i'm currently trying other things to get it to push through, like adding a required
tag just for redundancy, but I'm drawing a blank. My last-ditch idea would be to merge the counter to the Lot Number and have a separator and just parse it when it enters back to the POST of the suitelet, though I'm still hoping someone out there has an idea.Stefan Reeder
05/29/2024, 3:08 AM<form method="post">....</form>
7px
05/29/2024, 3:51 AM<form method="post" class="form-horizontal" action="...<http://netsuite.com|netsuite.com>...;deploy=1">
i've shrunked the action just in case, but it routes to a suitelet i've deployed. and yes, the entire html page is a form.Stefan Reeder
05/29/2024, 5:31 AM7px
05/29/2024, 6:25 AM<button type="submit" class="btn" style="width: 150px; height: 50px; font-size: 16px" formmethod="post">Submit to Netsuite</button>
Stefan Reeder
05/29/2024, 9:25 AMMarat
05/29/2024, 1:49 PMStefan Reeder
05/29/2024, 10:32 PMStefan Reeder
05/29/2024, 10:34 PM7px
05/30/2024, 6:16 AMdisabled
attribute to be the reason why it wasn't getting sent. I added this so it would prevent user input in one of the fields (forcing them to use the counter buttons instead).
I ended up resolving it by removing the attribute through an onsubmit
function call from the form
tag, since doing an onclick
function call from the submit
button didn't seem to register before the object was sent back to POST.
thanks for taking the time to reply though! truly appreciated the extra input.
@Marat I'll consider it for the next project, thanks. I've personally haven't learned it yet, but I'll definitely be reading up on it.Stefan Reeder
05/30/2024, 10:14 AM